<?php
include "../config/koneksi.php";
require_once "../class/kategori.php";

if (ISSET($_POST["MM_insert"]) && $_POST['kategori']!="" ){

	$kategori_dao = new Kategori_Dao();
	
	$kategori=new Kategori();
	$kategori->kategori = $_POST['kategori'];
	$kategori_dao->add($kategori);
	header("Location:view_kategori.php");
	
}
?>
<html>
<body>
	<form method="post" action="tambah_kategori.php">
	<input type="hidden" name="MM_insert" value="form_tambah">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
	<tr >
    <td height="30"> 
    <div align="left"><font size="3" face="tahoma">Tambah Kategori</font><hr color=#CCCCFF></div></td>
    </tr>
</table>
  <table width="400" border="0" align="center" bordercolor="#FF9900">
		
<tr bordercolor="#FFFFFF"> 
      <td valign="top"><font size="2" face="tahoma">Kategori</font></td>
      <td valign="top"><font size="2" face="tahoma">:</font></td>
      <td valign="top"> <input name="kategori" type="text" id="kategori" size="30"></td>
    </tr>
	    <tr bordercolor="#FFFFFF"> 
      <td height="29" colspan="2"></td><td>
          <input type="submit" name="Submit322" value="Simpan"><a href=master.php>
          <button type ="button" name="fulang2" value="Batal" class="btn btn-success" onClick="javascript:history.back()">Batal</button>
       </td>
    </tr>	
	</table>
	</form>
</body>
</html>